{% extends "bootstrap/base.html" %}

<meta name="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" http-equiv="Refresh" content="50"/>

{% block title %}🚀🚀🚀JobCenter🚀🚀🚀{% endblock %}


{% block head %}
 {{ super() }} 
<link rel="icon" href="{{ url_for('static', filename='img/favicon.ico') }}" type="image/x-icon">
<link rel="stylesheet" type="text/css" href="{{  url_for('static',filename='css/sweetalert.css') }}">
 <link rel="stylesheet" type="text/css" href="{{  url_for('static',filename='opsplatform/css/sweetalert.css') }}">
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
{% endblock %}

{% block navbar %}
<div class="navbar navbar-inverse" role="navigation">
    <div class="container">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
               <a class="navbar-brand" href="/">
                <b style="font-family:none;color:#5bc0de">
                    <span>🚀🚀🚀JobCenter🚀🚀🚀</span>
                </b></a>

        </div>
        <div class="navbar-collapse collapse">
            <ul class="nav navbar-nav">

            {% if current_user.is_authenticated %}
            <li><a href="{{ url_for('main.joblist')}}">定时任务列表</a></li>
            <li><a href="{{ url_for('main.joblog')}}">任务日志</a></li>
            <li><a href="{{url_for('main.createjob')}}">添加Apscheduler作业任务</a></li>
            <!--  仅管理员可以访问的视图  -->
                {% endif %}
            </ul>
            <ul class="nav navbar-nav navbar-right">
            <!-- <li><a href="{{ url_for('main.caidan')}}">彩蛋</a></li> -->
                {% if current_user.is_authenticated %}
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">Account <b class="caret"></b> 已登录</a>
                    <ul class="dropdown-menu">
                        <li><a href="{{ url_for('auth.change_password') }}">Change Password</a></li>
                        <li><a href="{{ url_for('auth.change_email_request') }}">Change Email</a></li>
                        <li><a href="{{ url_for('auth.logout') }}">Log Out</a></li>
                    </ul>
                </li>
                {% else %}
                <li><a href="{{ url_for('auth.login') }}" >登录</a></li>
                {% endif %}
            </ul>
        </div>
    </div>
</div>
{% endblock %}

{% block content %}
<div class="container">
     {% for message in get_flashed_messages(with_categories=True) %}
                 <div class="alert alert-{{ message[0] }}">
                     <button type="button" class="close" data-dismiss="alert">&times;</button>
                    <b>{{ message[1] }}</b>
                 </div>
        {% endfor %}

{% block page_content %}
{% endblock %}

</div>
<br>
<hr>


<!--  固定页脚 -->
<style>
    html {
  position: relative;
  min-height: 100%;
}

body {
  /* Margin bottom by footer height */
  margin-bottom: 60px;
}

.footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  /* Set the fixed height of the footer here */
  height: 35px;
  background-color: #f5f5f5;
}
</style>

<div class="footer row">
    <div class="col-md-4"></div>
    <div class="col-md-4">
        <p>© 2019 <b>
            <span class="fan">JobCenter</span>
        </b> · <a href="">隐私权和条款</a> · <a href="http://blog.sctux.com" target="_blank">博客</a> · <a href="http://github.com/guomaoqiu" target="_blank">Github项目</a></p>
    </div>
    <div class="col-md-2">
        <p class="pull-right"><a id="totop" href="#">返回顶部</a></p>
    </div>
</div>

{% endblock %}

{% block scripts %}
<script src="{{  url_for('static',filename='opsplatform/js/layer.js') }}"></script>
<script src="{{  url_for('static',filename='opsplatform/js/sweetalert.min.js') }}"></script>

{{ super() }}
{{ moment.include_moment() }}
{% endblock %}
